<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>侧边固定宽度</title>
</head>

<body>
    <div class="container1">
        <div class="aside1 bg">aside</div>
        <div class="body1">
            <div class="header1 bg">header</div>
            <div class="content1 bg">content</div>
            <div class="footer1 bg">footer</div>
        </div>
    </div>
    <style>
        .bg {
            background: #eee;
            margin: 10px;
        }

        .container1 {
            min-height: 100vh;
            display: flex;
        }

        .aside1 {
            /* flex: 0 0 200px; */
            flex: 0 0 20%;
        }

        .body1 {
            display: flex;
            flex-direction: column;
            flex: 1;
        }

        .content1 {
            flex: 1;
        }

        .header1,
        .footer1 {
            flex: 0 0 10%;
        }
    </style>
</body>

</html>